<%@ page import="dao.AreaDao" %>
<%@ page import="bean.Area" %><%--
  Created by IntelliJ IDEA.
  User: superzhaolu
  Date: 2017/6/28
  Time: 20:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <meta content="" name="description"/>
    <meta content="webthemez" name="author"/>
    <title>物流管理系统</title>
    <!-- Bootstrap Styles-->
    <link href="assets/css/bootstrap.css" rel="stylesheet"/>
    <!-- FontAwesome Styles-->
    <link href="assets/css/font-awesome.css" rel="stylesheet"/>
    <!-- Morris Chart Styles-->
    <link href="assets/js/morris/morris-0.4.3.min.css" rel="stylesheet"/>
    <!-- Custom Styles-->
    <link href="assets/css/custom-styles.css" rel="stylesheet"/>
    <!-- Google Fonts-->
    <link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'/>
    <link rel="stylesheet" href="assets/js/Lightweight-Chart/cssCharts.css">
</head>
<body>
<jsp:include page="header.jsp"/>
<%
    int id = Integer.parseInt(request.getParameter("id"));
    AreaDao areaDao = new AreaDao();
    Area area = areaDao.getArea(id);
%>

<div id="wrapper">
    <jsp:include page="header.jsp"/>
    <!--/. NAV TOP  -->
    <nav class="navbar-default navbar-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav" id="main-menu">
                <li>
                    <a class="active-menu" href="index.jsp"><i class="fa fa-dashboard"></i> 主控制面板</a>
                </li>
                <li>
                    <a href="peopleManger.jsp"><i class="glyphicon glyphicon-user"></i> 人员管理</a>
                </li>

                <li>
                    <a href="salaryManager.jsp"><i class="fa fa-sitemap"></i> 薪水管理</a>
                <li>
                    <a href="taskManager.jsp"><i class="fa fa-qrcode"></i> 任务管理</a>
                </li>

                <li>
                    <a href="areaManager.jsp"><i class="fa fa-table"></i> 区域管理</a>
                </li>
                <li>
                    <a href="stateManager.jsp"><i class="fa fa-edit"></i> 状态管理 </a>
                </li>
            </ul>

        </div>

    </nav>
    <!-- /. NAV SIDE  -->

    <div id="page-wrapper">
        <div class="header">
            <h1 class="page-header">
                主控制面板
                <small>欢迎使用物流管理系统</small>
            </h1>
        </div>
        <div id="page-inner">
            <div class="row">
                <div class="col-md-12">

                    <form action="updateArea?id=<%=area.getId()%>" class="form-group"
                          method="post">
                        <div class="modal-body">
                            <%--表单信息--%>
                            <%
                                Area areaSingle = areaDao.getArea(area.getId());
                            %>

                            <div class="form-group">
                                <label for="areaid">区域编号</label>
                                <input type="number" class="form-control" id="areaid"
                                       name="areaId" value="<%=areaSingle.getId()%>"
                                       placeholder="区域编号" readonly="readonly">
                            </div>

                            <div class="form-group">
                                <label for="updateName">区域名字</label>
                                <input type="text" class="form-control"
                                       id="updateName" name="areaName"
                                       value="<%=areaSingle.getName()%>"
                                       placeholder="区域名字">
                            </div>

                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default"
                                    data-dismiss="modal">
                                关闭
                            </button>
                            <button type="submit" class="btn btn-primary">
                                更新
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
